package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {
    IPage<Goods> findPage( Page<Goods> page, @Param("codeOrName") String codeOrName,@Param("goodsTypeId") Integer goodsTypeId);

    IPage<Goods> list(Page<Goods> goodsPage, @Param("goodsName") String goodsName, @Param("goodsTypeId") Integer goodsTypeId);

    Goods findByGoodsId(@Param("goodsId") Integer goodsId);

    void updateGoods( Goods goods);

    void saveGoods(Goods goods);

    void deleteGoods(Integer goodsId);
}
